package ide.ccf.ccproject;

import org.eclipse.core.runtime.Plugin;
import org.osgi.framework.BundleContext;

/**
 * CCF插件类，控制插件生命周期
 *
 */
public class CCFPlugin extends Plugin 
{
    public static final String PLUGIN_ID = "ide.ccf.cc";	// 插件ID
    private static CCFPlugin plugin;	// 插件实例
    
    /**
     * 控制器
     */
    public CCFPlugin() 
    {
        plugin = this;
    }

    /**
     * Never called
     */
    public void start(BundleContext context) throws Exception 
    {
        super.start(context);
    }

    /**
     * Never called
     */
    public void stop(BundleContext context) throws Exception 
    {
        plugin = null;
        super.stop(context);
    }

    /**
     * 返回共享插件实例
     * @return
     */
    public static CCFPlugin getDefault() 
    {
        return plugin;
    }
}